package com.zzyang.aop.demo.interceptor;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;

/**
 * TODO
 *
 * @author zhuoziyang
 * @date 2021/5/16 23:42
 */
@ComponentScan("com.zzyang.aop.demo.interceptor")
public class CustomAopDemo {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext();
        applicationContext.register(CustomAopDemo.class);
        applicationContext.refresh();
        MyTestBean bean = applicationContext.getBean(MyTestBean.class);
        System.out.println(bean.sayHello("zzyang"));
    }
}
